<link type="text/css" rel="stylesheet" href="<?php echo base_url() ?>themes/admin/comet/Css/Home.css" />
<link type="text/css" rel="stylesheet" href="<?php echo base_url() ?>themes/admin/comet/Css/Definition.css" />
<link type="text/css" rel="stylesheet" href="<?php echo base_url() ?>themes/admin/comet/Css/Input.css" />
<link type="text/css" rel="stylesheet" href="<?php echo base_url() ?>themes/admin/comet/Css/Message.css" />
<link type="text/css" rel="stylesheet" href="<?php echo base_url() ?>themes/admin/comet/Css/Text.css" />
<link type="text/css" rel="stylesheet" href="<?php echo base_url() ?>themes/admin/comet/Css/ImageURL.css" />
<link type="text/css" rel="stylesheet" href="<?php echo base_url() ?>themes/admin/comet/Css/Fancybox-1.3.4.css" />
<link type="text/css" rel="stylesheet" href="<?php echo base_url() ?>themes/admin/comet/Css/Gridview.css" />
<link type="text/css" rel="stylesheet" href="<?php echo base_url() ?>themes/admin/comet/Css/Colorbox.css" />
<link type="text/css" rel="stylesheet" href="<?php echo base_url() ?>themes/admin/comet/Css/validationEngine.jquery.css" />

<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>themes/admin/comet/JS/jquery.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>themes/admin/comet/JS/jquery-ui.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>themes/admin/comet/JS/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>themes/admin/comet/JS/comet-javascript.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>themes/admin/comet/JS/jquery-comet-tooltips.js"></script>

<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>themes/admin/comet/JS/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>themes/admin/comet/JS/jquery.colorbox.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>themes/admin/comet/JS/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>themes/admin/comet/JS/jquery.validationEngine-en.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>themes/admin/comet/JS/jquery.validationEngine.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>js/comet/ajax.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>js/comet/comet.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>js/comet/gridview.js"></script>
<script type="text/javascript" language="javascript">
    jQuery(document).ready(function() {
        jQuery("[title]").comet_tooltips({
            tip_follows_cursor: "on", //on/off
            tip_delay_time: 0 //milliseconds
        });

        //Validate
        jQuery("#formID").validationEngine();
        //
        
        var mainMenu = jQuery("#mainMenu ul li a");
        jQuery(mainMenu).hover(function(){
            jQuery(this).animate({
                marginRight:"+=10"
            });
        }, function(){
            jQuery(this).animate({
                marginRight:0
            });
        });

        jQuery("#table th#sort").click(function(){
            var img = jQuery(this).find("img");
            if(jQuery(img).attr("src") == "<?php echo base_url() ?>themes/admin/comet/Image/sort_desc.png"){
                jQuery(img).attr({
                    src:"<?php echo base_url() ?>themes/admin/comet/Image/sort_asc.png",
                    title:"Sort Asc"
                });
            }else {
                jQuery(img).attr({
                    src:"<?php echo base_url() ?>themes/admin/comet/Image/sort_desc.png",
                    title:"Sort Desc"
                });
            }
        });

        jQuery("#miniMenu ul li").hover(function(){
            jQuery(this).find("ul:first").css({
                visibility: "visible",
                display: "none"
            }).show(400);
        }, function(){
            jQuery(this).find("ul:first").css({
                visibility: "hidden"
            });
        });

        jQuery("#toggleMainMenu ul li").hover(function() {
            jQuery(this).find("ul:first").css({
                visibility: "visible",
                display: "none"
            }).show(400);
        }, function(){
            jQuery(this).find("ul:first").css({
                visibility: "hidden"
            });
        });

        jQuery("#menuBottom").hover(function(){
            jQuery(this).animate({
                opacity: 1
            });
        }, function(){
            jQuery(this).animate({
                opacity: 0.4
            });
        });
        jQuery("#menuBottom #miniMenuBottom ul li").hover(function(){
            jQuery(this).find("ul:first").css({
                visibility: "visible",
                display: "none"
            }).slideDown(400);
        }, function(){
            jQuery(this).find("ul:first").css({
                visibility: "hidden"
            });
        });

        var minimize = false;
        jQuery("#toggleSidebar").click(function(){
            /* Change image */

            if(jQuery("#sidebar a").find("img").attr("src") == "<?php echo base_url() ?>themes/admin/comet/Image/toggle_show.png"){
                jQuery(jQuery("#sidebar a").find("img")).attr({
                    src:"<?php echo base_url() ?>themes/admin/comet/Image/toggle_remove.png",
                    title:"Sidebar Hide"
                });
            } else {
                jQuery(jQuery("#sidebar a").find("img")).attr({
                    src:"<?php echo base_url() ?>themes/admin/comet/Image/toggle_show.png",
                    title:"Sidebar Show"
                });
            }

            /*----------*/
            if (!minimize) {
                jQuery("#contentLeft").animate({
                    width:70
                });

                jQuery("#logoText").fadeOut(300, function(){
                    var logoUrl = '<?php echo base_url() ?>themes/admin/comet/Image/frontpage.png';
                    jQuery(this).html("<img src='"+logoUrl+"' />");
                    jQuery(this).fadeIn(300);
                });
                jQuery("#mainMenu").fadeOut(300, function(){
                    jQuery(this).css({
                        visibility: "hidden"
                    });
                    jQuery("#toggleMainMenu").css({
                        display: "block"
                    });
                    jQuery(this).fadeIn(300);
                });

                jQuery("#contentRight").animate({
                    marginLeft:70
                });

                minimize = true;
            } else {
                jQuery("#contentLeft").animate({
                    width:220
                });

                jQuery("#logoText").html("<h1>Comet Admin</h1>");
                jQuery("#mainMenu").css({
                    visibility: "visible"
                });
                jQuery("#toggleMainMenu").css({
                    display: "none"
                });

                jQuery("#contentRight").animate({
                    marginLeft:220
                });

                minimize = false;
            }
            return false;
        });
    });
</script>
<!-- Tab -->
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>js/3rd party/tab/jquery.tabs.pack.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>js/3rd party/tab/jquery.history_remote.pack.js"></script>
<link type="text/css" rel="stylesheet" href="<?php echo base_url() ?>js/3rd party/tab/jquery.tabs.css" />